/*
 * 前端查询数据类汇总
 * @author: huangzong
 */
import C from '@/common/common.js'

class Setting {
  /*
   * 打开基础设置页面
   */
  async openSetting () {
    return await C.openBrowserWindow('/setting', {}, {
      transparent: true,
      frame: false,
      // openDevTools: true,
      width: 650,
      height: 520,
      useSpa: false,
      spaModel: 'setting'
    })
  }

  /*
   * 获取基础的配置
   */
  async getSetting () {
    return await C.ajax('/shop/basis/getBaseConfig')
  }

  /*
   * 设置基础配置
   */
  async setSetting (data) {
    return await C.ajax('/shop/basis/setBaseConfig', data, 'post')
  }
}

export default new Setting()
